import request from '@/utils/request'

// 查询参数列表
export function listPlatformConfig(query) {
  return request({
    url: '/h2-sys-config/pageList',
    method: 'post',
    data: query
  })
}


// 新增参数配置
export function addPlatformConfig(data) {
  return request({
    url: '/h2-sys-config/add',
    method: 'post',
    data: data
  })
}

//通过分组id查询配置
export function listConfigByGroup(groupId) {
  return request({
    url: `/h2-sys-config/listConfigByGroup/${groupId}`,
    method: 'post'
  })
}

// 修改参数配置
export function updatePlatformConfig(data) {
  return request({
    url: '/h2-sys-config/put',
    method: 'post',
    data: data
  })
}

//批量修改平台参数值
export function batchUpdatePlatformConfig(data) {
  return request({
    url: '/h2-sys-config/save',
    method: 'post',
    data: data
  })
}

// 删除参数配置
export function delPlatformConfig(id) {
  return request({
    url: `/h2-sys-config/del/${id}`,
    method: 'delete'
  })
}

